package cn.wolfcode.wolf2w.controller;

import cn.wolfcode.wolf2w.util.UMEditorUploader;
import cn.wolfcode.wolf2w.util.UploadUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

@RestController
public class UploadController {

	@PostMapping("/coverImageUpload")
	public Object coverImageUpload(MultipartFile pic) throws Exception {
		String upload = UploadUtil.uploadAli(pic);
		return upload;
	}


}
